(window_scroll, Fmove_to_window_line): Avoid dividing negative numbers,
authorKarl Heuer <kwzh@gnu.org>
Mon, 14 Mar 1994 21:36:17 +0000 (21:36 +0000)
committerKarl Heuer <kwzh@gnu.org>
Mon, 14 Mar 1994 21:36:17 +0000 (21:36 +0000)
since the rounding effect is implementation-defined.

src/window.c

index 78a85300b985687fd3c25d579269c6ed6427a0ce..0f827113b65873c7d11a8b25ffb463b080da781a 100644 (file)
@@ -2178,7 +2178,7 @@ window_scroll (window, n, noerror)
 
   if (NILP (tem))
     {
-      Fvertical_motion (make_number (- ht / 2), window);
+      Fvertical_motion (make_number (- (ht / 2)), window);
       XFASTINT (tem) = point;
       Fset_marker (w->start, tem, w->buffer);
       w->force_start = Qt;
@@ -2467,7 +2467,7 @@ negative means relative to bottom of window.")
   XSET (window, Lisp_Window, w);
   if (start < BEGV || start > ZV)
     {
-      Fvertical_motion (make_number (- height / 2), window);
+      Fvertical_motion (make_number (- (height / 2)), window);
       Fset_marker (w->start, make_number (point), w->buffer);
       w->start_at_line_beg = Fbolp ();
       w->force_start = Qt;